package com.zhz.mall.admin.modules.oss.controller;

import com.zhz.mall.admin.dto.OssPolicyResult;
import com.zhz.mall.admin.modules.oss.service.OssService;
import com.zhz.mall.common.api.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: Oss文件上传下载控制器
 * @motto: 代码源于生活，高于生活艺术
 * @author: zhouhengzhe
 * @date: 2023/1/13 11:05
 * @since 1.0
 **/
@RestController
@Api("Oss管理")
@RequestMapping("/aliyun/oss")
public class OssController {

    @Autowired
    private OssService ossService;

    @ApiOperation("oss上传签名生成")
    @GetMapping("/policy")
    public CommonResult<OssPolicyResult> policy() {
        return CommonResult.success(ossService.policy());

    }


}
